import Vue from 'vue'
import Router from 'vue-router'

const HelloWorld = r => require.ensure([], () => r(require('@/components/HelloWorld')), 'HelloWorld');
const Home = r => require.ensure([], () => r(require('@/pages/Home')), 'Home');
const List = r => require.ensure([], () => r(require('@/pages/list')), 'List');
Vue.use(Router)

export default new Router({
  routes: [
    
    {
      path: '/',
      name: 'Home',
      component: Home,
      children:[
        {
          path: '/hello',
          name: 'HelloWorld',
          component: HelloWorld
        }
      ]

    },
    {
      path: '/list',
      name: 'list',
      component: List
    },
  ]
})
